ConfigurationBuilder builder = new ConfigurationBuilder();
builder
.identityManager()
.ldapStore()
.url("ldap://localhost:10389/")
.bindDN("uid=jduke,ou=People,dc=jboss,dc=org")
.bindCredential("theduke")
.userDNSuffix("ou=People,dc=jboss,dc=org")
.roleDNSuffix("ou=Roles,dc=jboss,dc=org")
.groupDNSuffix("ou=Groups,dc=jboss,dc=org");
PicketBoxManager picketBoxManager = // create and start the manager
IdentityManager identityManager = picketBoxManager.getIdentityManager();
// now you can play with the Identity Manager instance using the JPA Identity Store.